package com.taikang.hmp.hbusiness.doctor.setbase.service.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.taikang.hmp.frame.common.datastructre.Dto;
import com.taikang.hmp.frame.common.datastructre.support.BaseDto;
import com.taikang.hmp.frame.common.service.impl.BaseServiceImpl;
import com.taikang.hmp.hbusiness.doctor.setbase.bean.Version;
import com.taikang.hmp.hbusiness.doctor.setbase.service.IVersionService;

public class VersionServiceImpl extends BaseServiceImpl implements
		IVersionService {

	@Override
	public List<Dto> getVersion(Dto paramDto) {
		Map<String,String> map = new HashMap<String,String>();
		map.put("os", paramDto.getAsString("os"));
		map.put("market", paramDto.getAsString("market"));
		Version ver = (Version)super.getNewDao().queryForObject("version_space.getVersion", map);
		List<Dto> result = new ArrayList<Dto>();
		if(ver!=null){
			Dto resultMap = new BaseDto();
			resultMap.put("ver",ver.getVer());
			resultMap.put("link",ver.getLink());
			resultMap.put("ver_desc", ver.getVer_desc());
			result.add(resultMap);
		}
		return result;
	}

}
